﻿<style>
    .input {
        height: 30px;
        border: 0.5px solid rgba(224, 224, 224, 0.71);
        margin-left: 2px;
        margin-top: 1px;
    }

    .icon1 {
        color: #4995ff;
        font-weight: 800;
        margin-left: 3px;
    }

    .icon11 {
        color: #ff6a00;
        font-weight: 800;
    }

    .icon2 {
        color: red;
        font-size: 12px;
        font-weight: 800;
        margin-left: 5px;
    }

    .s1 {
        background-color: #e8e8e8;
        border: 2px solid #e8e8e8;
        border-radius: 5px;
        margin-left: 2px;
        margin-right: 2px;
    }

    .s2 {
        margin-left: 6px;
        margin-right: 2px;
        color: #b4b4b4;
        cursor: pointer;
    }
</style>
<div class="layui-form" lay-filter="layuiadmin-app-form-list" id="layuiadmin-app-form-list" style="padding: 20px 30px 0 0;">

    <fieldset class="layui-elem-field layui-field-title">
        <legend>基础信息</legend>
    </fieldset>
    <script type='text/html' template>
        <input type='hidden' name='PID' id="PID" value="{{ d.params.PID || '' }}" />
    </script>
    <div class='layui-form-item'>
        <label class='layui-form-label'>名称</label>
        <div class='layui-input-inline' style="width:420px;">
            <script type='text/html' template>
                <input type='text' name='Name' value='{{ d.params.Name || '' }}' lay-verify='required' placeholder='名称' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>

    <div class='layui-form-item'>
        <label class='layui-form-label'>上级分类</label>
        <div class='layui-input-inline' style="width:420px;">
            <script type='text/html' template>
                <input type='text' name='ParentID_SelSourceName' value='{{ d.params.ParentID_SelSourceName || '' }}' placeholder='上级分类' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>

    <div class='layui-form-item'>
        <label class='layui-form-label'>图片</label>
        <div class='layui-input-inline' style="width:80%">
            <div class="layui-upload">
                <div class="layui-upload-list" id="divImgs"></div>
                <script type='text/html' template lay-done='layui.data.setUploads(d.params);'>
                    <input type="hidden" name="Path_Upload" id="Path_Upload" value="{{ d.params.Path_Upload || '' }}">
                </script>
                <hr />
            </div>
        </div>
    </div>

    <div class='layui-form-item'>
        <label class='layui-form-label'>简介</label>
        <div class='layui-input-inline' style="width:420px;">
            <script type='text/html' template>
                <input type='text' name='Introduction' value='{{ d.params.Introduction || '' }}' placeholder='简介' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>
    <div class='layui-form-item'>
        <label class='layui-form-label'>说明</label>
        <div class='layui-input-inline' style="width:420px;">
            <script type='text/html' template>
                <input type='text' name='RMK' value='{{ d.params.RMK || '' }}' placeholder='说明' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>
    <!--<div class='layui-form-item'>
        <label class='layui-form-label'>其他</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' name='Other1' value='{{ d.params.Other1 || '' }}' placeholder='其他' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>
    <div class='layui-form-item'>
        <label class='layui-form-label'>其他</label>
        <div class='layui-input-inline'>
            <script type='text/html' template>
                <input type='text' name='Other2' value='{{ d.params.Other2 || '' }}' placeholder='其他' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>-->
    <div class='layui-form-item'>
        <label class='layui-form-label'>排序</label>
        <div class='layui-input-inline' style="width:420px;">
            <script type='text/html' template>
                <input type='text' name='Sort' value='{{ d.params.Sort || '0' }}' lay-verify='number' placeholder='排序' autocomplete='off' class='layui-input'>
            </script>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label"></label>
        <div class="layui-input-inline">
            <input type="button" onclick="Close()" value="关闭" class="layui-btn">
        </div>
    </div>
</div>

<script type="text/javascript">
    function Close() {
        layer.closeAll();
    }

    layui.data.setUploads = function (d) {
        layui.use(['jquery', 'upload', 'admin'], function () {
            window.jQuery = window.$ = layui.jquery;
            upload = layui.upload,
            admin = layui.admin;

            var pics = d.Path_Upload;
            if (pics != "" && pics != null && pics != 'null') {
                addImg({ name: pics, path: layui.setter.ImgPath + pics });
            }
        })
    }
    function addImg(src) {
        var div = "divimg3";
        var img = "Img3";
        var html = "    <div style=\"line-height:100px;float:left\" id='" + div + "'> " +
                           " <img id='" + img + "' src=\"" + src.path + "\"   alt=\"\" class=\"layui-upload-img\">" +
                       "</div>";
        $('#divImgs').html(html);
        $("#Path_Upload").val(src.name);
    }
    

    layui.use(['form', 'admin', 'upload', 'jquery'], function () {
        var form = layui.form;//required（必填项）phone（手机号）email（邮箱）url（网址）number（数字）date（日期）identity（身份证） 自定义值
        window.jQuery = window.$ = layui.jquery;

    });



</script>
